package optimizers.ganeat.amplify;

import java.util.Map;

import javax.swing.JPanel;
import javax.swing.JProgressBar;

import org.w3c.dom.Element;

import common.RunStatus;

import optimizers.commons.RunConfig;
import optimizers.ganeat.GA;
import optimizers.ganeat.Individual;

import optimizers.ganeat.square.IndividualSquare;
import runconfiguration.AmplyConfiguration;
import runconfiguration.SquareConfiguration;
import visualization.GraphDisplayer;

public class GAAmplify extends GA {

	String initIndiv = "Node gens:\r\n" + " a 28.3816 1e-9\r\n"
			+ " b 50.0 1e-9\r\n" + " c 50.0 1e-9\r\n" + "Connection gens:\r\n"
			+ " 1 a->a false 3.7959\r\n" + "2 a->c true 10\r\n"
			+ "3 c->b true 10\r\n" + "Exo: 0.68182\r\n" + "Pol: 17\r\n"
			+ "Nick: 3";

	public GAAmplify(RunConfig config, JPanel panelFitness,
			JPanel panelSpecies, JPanel panelIndiv, RunStatus runStatus,
			JProgressBar progressBar, Element fitnessElement) {
		super(config, panelFitness, panelSpecies, panelIndiv, runStatus,
				progressBar, fitnessElement);
	}

	public GAAmplify(RunConfig config, String initIndiv, JPanel panelFitness,
			JPanel panelSpecies, JPanel panelIndiv, RunStatus runStatus,
			JProgressBar progressBar, Element fitnessElement) {
		super(config, panelFitness, panelSpecies, panelIndiv, runStatus,
				progressBar, fitnessElement);
		this.initIndiv = initIndiv;
	}

	@Override
	public Individual getInitialIndividual() {
		return new AmplifyIndividual(innovations, nodeNames, -1, 0, config,
				initIndiv);
	}

	@Override
	public Individual getNewIndividual(Map<String, Integer> innovations2,
			Map<String, String> nodeNames2, int i, int j) {
		// TODO Auto-generated method stub
		return new AmplifyIndividual(innovations2, nodeNames2, i, j, config);
	}

	@Override
	public String getProblemName() {
		// TODO Auto-generated method stub
		return "Amplify";
	}

}
